﻿using FluentNHibernate.Mapping;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace mscook.core.domain
{
    public class MagazineMap : ClassMap<Magazine>
    {
        public MagazineMap()
        {
            Id(o => o.Id);
            Map(o => o.CreateTime);
            Map(o => o.IsDelete);
            Map(o => o.Version);
            Map(o => o.EntityIndex);

            Map(o => o.Title);
            Map(o => o.Volume);
            Map(o=>o.Year);
            Map(o => o.ImageName);
            Map(o=>o.ReadTimes).Default("0");

            References<ResourceBonusSetting>(o => o.ResourceBonusSetting).Cascade.All();
        }
    }
}
